package com.gitee.wsl.common.draw

import android.graphics.Canvas
import android.graphics.ColorFilter
import android.graphics.drawable.Drawable

fun interface DrawerItem {

    fun drawBefore(canvas: Canvas){}

    fun draw(canvas: Canvas)

    fun drawAfter(canvas: Canvas){}

    fun onSizeChanged(width: Int, height: Int, oldWidth: Int, oldHeight: Int){}

}

abstract class AbstractDrawable: Drawable(),DrawerItem{


    override fun setAlpha(alpha: Int) {
    }

    override fun setColorFilter(colorFilter: ColorFilter?) {
        TODO("Not yet implemented")
    }

    @Deprecated("Deprecated in Java")
    override fun getOpacity(): Int {
        TODO("Not yet implemented")
    }
}

abstract class AbstractTouchAbleDrawable<T>:AbstractDrawable(),TouchDrawerItem<T>{
    override var touchListener: TouchListener<T>?=null


}